package routes

import (
	"net/http"

	"github.com/gin-gonic/gin"

	"hyper/app/Http/Controllers/Admin"
	"hyper/app/Http/Middleware"
	"hyper/supports/response"
)

func RegisterAdminRoute(r *gin.RouterGroup) {
	r.GET("/", func(c *gin.Context) {
		response.ResponseException(c, http.StatusOK, "Success", nil)
		return
	})

	adminLogin := new(Admin.LoginController)

	r.POST("/register", Middleware.ParamMiddleware, adminLogin.Register)
	r.POST("/login", adminLogin.Login)
	r.Use(Middleware.AuthMiddleware())
	{
		r.POST("/logout", adminLogin.Logout)
		r.POST("/me", adminLogin.Me)

	}
}
